const getLocation = () =>{
  return new Promise ((resolve,reject)=>{
  var geolocation = new window.BMap.Geolocation();
  geolocation.getCurrentPosition(function(res){
  // console.log(res); 
	if(this.getStatus() === window.BMAP_STATUS_SUCCESS){
		resolve(res.address)
	}
	else {
		reject(res)
	}        
});
  }) 
}
export default getLocation;